package com.supinfo.bonjoursupinfo.controller.loader;

import android.content.Context;
import android.database.Cursor;
import android.support.v4.content.AsyncTaskLoader;

import com.supinfo.bonjoursupinfo.controller.PictureController;

public class PhotosListLoaderFromBdd extends AsyncTaskLoader<Cursor> {

	public PhotosListLoaderFromBdd(Context context) {
		super(context);
	}
	
	@Override
    protected void onStartLoading() {
        super.onStartLoading();
        forceLoad();
    }

	@Override
	public Cursor loadInBackground() {
		PictureController ctrl = new PictureController();
		return ctrl.GetAllPicture();
	}
	
}
